﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ETRobocon.RaceTraking.GameManagement
{
    /// <summary>
    /// TurnTeamEntryUserControl.xaml の相互作用ロジック
    /// </summary>
    public partial class TurnTeamEntryUserControl : UserControl
    {
        public string CourseName
        {
            get { return CurrentRunner.Course.ToString(); }
            set {
                WSRunner.CourseName course = WSRunner.CourseName.IN;
                if (value.CompareTo(WSRunner.CourseName.IN.ToString()) != 0)
                {
                    course = WSRunner.CourseName.OUT;
                }
                CurrentRunner.Course = course;
            }
        }
        public WSTeamEntry CurrentTeamEntry
        {
            get
            {
                return this.Resources["targetTeamEntry"] as WSTeamEntry;
            }
        }

        public WSRunner CurrentRunner
        {
            get { return this.Resources["targetRunner"] as WSRunner; }
            set { this.Resources["targetRunner"] = value; }
        }
        
        public TurnTeamEntryUserControl()
        {
            InitializeComponent();
        }
    }
}
